package com.mccrea.pattern.proxy.staticproxy;

/**
 * @Classname TeacherDaoProxy
 * @Description 代理对象
 * @Date 2021/5/14 0014 17:46
 * @Created by Mccrea_Gao
 */
public class TeacherDaoProxy implements ITeacherDao {

    // 目标对象，通过接口来聚合
    private ITeacherDao target;

    public TeacherDaoProxy(ITeacherDao target) {
        this.target = target;
    }

    @Override
    public void teache() {
        System.out.println("代理开始===========");
        target.teache();
        System.out.println("代理结束===========");
    }
}
